import url from '../main.ts';

let dirt = '';
// 按需加载
// 主页
const Main = resolve => require(['@/views/Main'], resolve);

// 首页
const Home = resolve => require(['@/views/home/home'], resolve);
// 当前账号无功能与数据权限，请联系相关人员开通后重新访问
const HomeWord = resolve => require(['@/views/home/homeword'], resolve);


// 404页面
const NotFound = resolve => require(['@/views/404'], resolve);


// 登录页面
const Login = resolve => require(['@/views/login/Login'], resolve);

// 影厅监控页面
const cinemaDeviceWatch = resolve => require(['@/views/watch/cinemaDeviceWatch'], resolve);

// 故障监控页面
const troubleWatch = resolve => require(['@/views/watch/troubleWatch'], resolve);

// 排期监控页面
const schedulesWatch = resolve => require(['@/views/watch/schedulesWatch'], resolve);

// TMS状态监控页面
const tmsStatusWatch = resolve => require(['@/views/watch/tmsStatusWatch'], resolve);

// 影院放映监控页面
const showStatusWatch = resolve => require(['@/views/watch/showStatusWatch'], resolve);

// 影院放映日志页面
const cinemaShowLog = resolve => require(['@/views/watch/cinemaShowLog'], resolve);

// 排期监控详情页面
const schedulesWatchDetail = resolve => require(['@/views/watch/schedulesWatchDetail'], resolve);

// 影厅监控详情页面
const cinemaWatchDetail = resolve => require(['@/views/watch/cinemaWatchDetail'], resolve);
// VNC服务监控，广告运营
const watchutilize = resolve => require(['@/views/watch/utilize'], resolve);

const utilize = resolve => require(['@/views/utilize/cinemaShowLog'], resolve);


// 影院地图页面
const cinemaMap = resolve => require(['@/views/cinema/cinemaMap'], resolve);

// 影院信息页面
const cinemaList = resolve => require(['@/views/cinema/cinemaList'], resolve);

// 影厅信息页面
const cinemaHallList = resolve => require(['@/views/cinema/cinemaHallList'], resolve);

// 设备信息页面
const cinemaDeviceList = resolve => require(['@/views/cinema/cinemaDeviceList'], resolve);

const RoleManagement = resolve => require(['@/views/system/roleManagement/roleManagement'],resolve);
const UserManagement = resolve => require(['@/views/system/userManagement/userManagement'],resolve);
const DataDictionary = resolve => require(['@/views/system/dataDictionary/dataDictionary'],resolve);

// 新增工单管理
const workoRder = resolve => require(['@/views/watch/workoRder'], resolve);
const workoRderCreat = resolve => require(['@/views/watch/workoRderCreat'], resolve);
const workoRderCreatDetails = resolve => require(['@/views/watch/workoRderCreatDetails'], resolve);
// 信息变更
const cinemaInformationChange = resolve => require(['@/views/cinema/cinemaInformationChange'], resolve);
const cinemaInformationJournal = resolve => require(['@/views/cinema/cinemaInformationJournal'], resolve);
const cinemaInformationConfirmation = resolve => require(['@/views/cinema/cinemaInformationConfirmation'], resolve);

// 设置
const setManagement = resolve => require(['@/views/set/userManagement/management'], resolve);
const newManagement = resolve => require(['@/views/set/userManagement/newManagement'], resolve);
const managementList = resolve => require(['@/views/set/userManagement/managementList'], resolve);
const accountNumber = resolve => require(['@/views/set/userManagement/accountNumber'], resolve);
const log = resolve => require(['@/views/log'], resolve);



let routes = [
    {
        path: '/',
        component: Main,
        name: '主页',
        iconCls: 'fa fa-cloud',
        leaf: true,
        meta: {
            requireAuth: false,
        },
        redirect: function (to) {
            console.log(to)
            let authOk = to.meta.requireAuth;

            // if (authOk) {
            //     return '/home/home'
            // } else {
                return '/login/Login'
            // }
        },
        children: [
            {path: '/home/home', component: Home, name: '首页'},
        ]
    },
    // {
    // path: '/',
    // component: Main,
    // name: '主页',
    // hidden: true,
    // leaf: true,
    // children: [
    	// { path: '/login/Login', component: Login, name: 'OA',hidden: true,leaf: true},
    	{ path: '/login/Login', component: Login, name: 'OA'},

    // ]
    // },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/cinemaDeviceWatch', component: cinemaDeviceWatch, name: '影厅设备监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/home', component: HomeWord, name: '当前账号无功能与数据权限'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/troubleWatch', component: troubleWatch, name: '故障监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/schedulesWatch', component: schedulesWatch, name: '排期监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/tmsStatusWatch', component: tmsStatusWatch, name: 'TMS状态监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/showStatusWatch', component: showStatusWatch, name: '影院放映监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/cinemaShowLog', component: cinemaShowLog, name: '影院放映日志'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/system/dataDictionary', component: DataDictionary, name: '数据字典'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/system/userManagement/userManagement', component: UserManagement, name: '用户管理'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/system/roleManagement/roleManagement', component: RoleManagement, name: '角色管理'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/schedulesWatchDetail', component: schedulesWatchDetail, name: '排期监控详情'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/cinemaWatchDetail', component: cinemaWatchDetail, name: '影厅监控详情'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/utilize', component: watchutilize, name: 'VNC服务监控'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/utilize', component: utilize, name: '广告运营'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaMap', component: cinemaMap, name: '影院地图'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaList', component: cinemaList, name: '影院信息'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaHallList', component: cinemaHallList, name: '影厅信息'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaDeviceList', component: cinemaDeviceList, name: '设备信息'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/workoRder', component: workoRder, name: '工单列表'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/workoRderCreat', component: workoRderCreat, name: '创建工单'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/watch/workoRderCreatDetails', component: workoRderCreatDetails, name: '工单详情'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaInformationChange', component: cinemaInformationChange, name: '信息变更'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaInformationJournal', component: cinemaInformationJournal, name: '信息变更日志'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/cinema/cinemaInformationConfirmation', component: cinemaInformationConfirmation, name: '影院变更确认'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/set/userManagement/management', component: setManagement, name: '设置'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/set/userManagement/newManagement', component: newManagement, name: '总部管理'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/set/userManagement/accountNumber', component: accountNumber, name: '账号设置'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/log', component: log, name: '操作日志'},

        ]
    },
    {
        path: '/',
        component: Main,
        name: '主页',
        hidden: true,
        iconCls: '',
        leaf: true,
        children: [
            {path: '/set/userManagement/managementList', component: managementList, name: '影院接入'},

        ]
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '*',
        hidden: true,
        redirect: {path: '/404'}
    },
];

export default routes;
